﻿<?php

include("db_connection.php"); //db접속파일
global $connect;

//text_exe("net_eng"); //시험가동하는데 쓴다.

$sql = "select * from login_info";
echo $sql ;
$rs = mysql_query($sql,$connect);

while($result = mysql_fetch_array($rs)){
    $no = $result[no];
    $id  = $result[id];
    $name = $result[name];
    $email = $result[email];
    $pw = $result[pw];
    $inviter = $result[inviter];

    $xmlList.="<user><no>$no</no><id>$id</id><id>$id</id><email><$email></email><pw>$pw</pw><inviter>$inviter</inviter></user>";
}
mysql_free_result($rs);
$fp = fopen("login_info.xml","w");
$xmlDoc="<?xml version='1.0' encoding='UTF-8'?><root><login_info>$xmlList</login_info></root>";
fputs($fp, $xmlDoc);
fclose($fp);

?>
